#lang racket

(define (make-vect x y) (cons x y))

(define (xcor-vect v) (car v))

(define (ycor-vect v) (cdr v))

(define (add-vect v1 v2)
  (let ((x1 (car v1))
        (x2 (car v2))
        (y1 (cdr v1))
        (y2 (cdr v2)))
    (make-vect (+ x1 x2) (+ y1 y2))))

(define (sub-vect v1 v2)
  (let ((x1 (car v1))
        (x2 (car v2))
        (y1 (cdr v1))
        (y2 (cdr v2)))
    (make-vect (- x1 x2) (- y1 y2))))

(define (scale-vect s v)
  (let ((x (car v))
        (y (cdr v)))
    (make-vect (* x s) (* y s))))

(define v1 (make-vect 1 2))

(define v2 (make-vect 3 4))

(add-vect v1 v2)

(sub-vect v1 v2)

(scale-vect 5 v1)